//
//  HomeKeepCell.m
//  NotepadApp
//
//  Created by yobet on 2018/4/17.
//  Copyright © 2018年 HJ. All rights reserved.
//

#import "HomeKeepCell.h"
#import "HomeKeepModel.h"

@interface HomeKeepCell ()
@property (weak, nonatomic) IBOutlet UIImageView *mianImage;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *mainImageH;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *mianImageW;
@property (weak, nonatomic) IBOutlet UILabel *content;
@property (weak, nonatomic) IBOutlet UILabel *address;
@property (weak, nonatomic) IBOutlet UILabel *time;

@end
@implementation HomeKeepCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setModel:(HomeKeepModel *)model {
    _model = model;
    if (![model.image isKindOfClass:[NSNull class]]) {
        self.mainImageH.constant = 80.0;
        self.mianImageW.constant = 80.0;
        self.mianImage.image = [UIImage imageWithData:model.image];
    }else {
        self.mainImageH.constant = 0.0;
        self.mianImageW.constant = 0.0;
    }
    
    self.content.text = model.content;
    self.address.text = model.address;
    self.time.text = model.time;
    
}
@end
